import * as moment from 'moment';

export class GlobalTools {
  static date2Timestamp(date: string | number): number;
  static date2Timestamp(date: Date): number;
  static date2Timestamp(date: string | Date | number) {
    if (typeof date === 'string' || typeof date === 'number') {
      return moment(new Date(date)).valueOf();
    } else {
      console.log(date);
      return moment(date).valueOf();
    }
  }
}
